Map Data
-
The
MGLFeature
protocol is used to provide details about geographic features contained in a map view’s tile sources. Each concrete subclass ofMGLShape
in turn has a subclass that conforms to this protocol.Typically, you do not create feature objects yourself but rather obtain them using
See more-[MGLMapView visibleFeaturesAtPoint:]
and related methods. Each feature object associates a shape with an identifier and attributes as specified by the source. Like ordinaryMGLAnnotation
objects, some kinds ofMGLFeature
objects can also be added to a map view using-[MGLMapView addAnnotations:]
and related methods.Declaration
Objective-C
@protocol MGLFeature <MGLAnnotation>
Swift
protocol MGLFeature : MGLAnnotation
-
The
MGLMultiPointFeature
class represents a multipoint in a tile source.Declaration
Objective-C
@interface MGLMultiPointFeature : MGLMultiPoint <MGLFeature>
Swift
class MGLMultiPointFeature : MGLMultiPoint, MGLFeature
-
The
MGLMultiPolygonFeature
class represents a multipolygon in a tile source.Declaration
Objective-C
@interface MGLMultiPolygonFeature : MGLMultiPolygon <MGLFeature>
Swift
class MGLMultiPolygonFeature : MGLMultiPolygon, MGLFeature
-
The
MGLMultiPolylineFeature
class represents a multipolyline in a tile source.Declaration
Objective-C
@interface MGLMultiPolylineFeature : MGLMultiPolyline <MGLFeature>
Swift
class MGLMultiPolylineFeature : MGLMultiPolyline, MGLFeature
-
The
MGLPointFeature
class represents a point in a tile source.Declaration
Objective-C
@interface MGLPointFeature : MGLPointAnnotation <MGLFeature>
Swift
class MGLPointFeature : MGLPointAnnotation, MGLFeature
-
The
MGLPolygonFeature
class represents a polygon in a tile source.Declaration
Objective-C
@interface MGLPolygonFeature : MGLPolygon <MGLFeature>
Swift
class MGLPolygonFeature : MGLPolygon, MGLFeature
-
The
MGLPolylineFeature
class represents a polyline in a tile source.Declaration
Objective-C
@interface MGLPolylineFeature : MGLPolyline <MGLFeature>
Swift
class MGLPolylineFeature : MGLPolyline, MGLFeature
-
The
MGLShapeCollectionFeature
class represents a shape collection in a tile source.Declaration
Objective-C
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
Swift
class MGLShapeCollectionFeature : MGLShapeCollection, MGLFeature